<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>

<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<%@ include file="/WEB-INF/views/shared/master/contentHeader.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/index.jsp"%>

<t:form commandName="contactSearch" action="/admin/user/contact/index"
	ajaxPost="true" onSuccess="onSuccess">
	<t:panel cssClass="panel-flat border-top-xlg border-top-primary"
		customBody="true" customHead="true">
		<t:panelHead title="所有成员"></t:panelHead>
		<div class="panel-body">
			<div class="row">
				<c:import url="input.jsp" />
			</div>
			<div id="tableContent" class="row">
				<c:import url="output.jsp" />
			</div>
		</div>
	</t:panel>
</t:form>
<script type="text/javascript">
	$(function() {
		bindOutputClick();
	});

	function onSuccess(res) {
		$("#tableContent").html(res);
		redrawTable();
		bindOutputClick();
	}
	function searchCallback() {
		formSubmit();
	}
	function pagerChangeCallback() {
		formSubmit();
	}
	function sortingCallback() {
		formSubmit();
	}
	function formSubmit() {
		$("form:first").submit();
	}
	function bindOutputClick(){
		$(".panel-contact").on("click",function(){
			if($(this).hasClass("bg-primary")){
				$(this).removeClass("bg-primary");
			}else{
				$(".panel-contact.bg-primary").removeClass("bg-primary");
				$(this).addClass("bg-primary");	
			}
		});
	}
</script>
<%@ include file="/WEB-INF/views/shared/master/cntable.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formbuttons.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formstyling.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formselects.jsp"%>
<%@ include file="/WEB-INF/views/shared//master/contentFooter.jsp"%>